﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GuoShuCan.SDK.Web.Globalization;
using GuoShuCan.SDK.Web.ServerControls.Manage;
using GuoShuCan.SDK.Web.ServerControls;
using GuoShuCan.SDK.Web.Data;
using System.Data;
using System.Data.OleDb;
public partial class Manage_ListManage : UserControl, IManageMaster, IUpdateCulture, ISetIEditControl, IGetLocalResourceObject, IEditControlListDataBind
{
    #region IEditControlListDataBind
    /// <summary>
    /// 重新绑数据。
    /// </summary>
    void IEditControlListDataBind.ListDataBind()
    {
        this.PageDataBind();
        this.up1.Update();
    }
    #endregion
    #region IGetLocalResourceObject
    /// <summary>
    /// 
    /// </summary>
    /// <param name="key"></param>
    /// <returns></returns>
    object IGetLocalResourceObject.GetLocalResourceObject(string key)
    {
        return this.GetLocalResourceObject(key);
    }
    #endregion
    #region IUpdateCulture
    void IUpdateCulture.UpdateCulture()
    {
        //更新网站标题名称。
        if (_iEditControl.EditPlaceHolder.Controls.Count == 0)
        {
            this.Page.Title = ((IGetLocalResourceObject)this.Page).GetLocalResourceObject("Title").ToString() + (" - [ " + this.GetLocalResourceObject("Title").ToString() + " ]");
        }
        _iLanguage = (ILanguage)this.Page;
        _iLanguage.CreatedLanguage();
        //
        this.UpdateCulture();
    }
    #endregion
    /// <summary>
    /// 更新区域数据。
    /// </summary>
    void UpdateCulture()
    {
        //重新绑定控件数据。
        this.PageDataBind();
        this.up1.Update();
    }
    /// <summary>
    /// 区域语言接口。
    /// </summary>
    ILanguage _iLanguage;
    /// <summary>
    /// 数据接口。
    /// </summary>
    IData idata;
    #region ISetIEditControl
    IEditControl ISetIEditControl.EditControl
    {
        get
        {
            return null;
        }
        set
        {
            _iEditControl = value;
        }
    }
    #endregion
    /// <summary>
    /// 编辑控件接口。
    /// </summary>
    IEditControl _iEditControl;
    /// <summary>
    /// 异步加载等待控件。
    /// </summary>
    AsyncListLoadingWaitControl _asyncListLoadingWaitControl;
    /// <summary>
    /// 
    /// </summary>
    /// <param name="e"></param>
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        //更新网站标题名称。
        if (_iEditControl.EditPlaceHolder.Controls.Count == 0)
        {
            this.Page.Title = ((IGetLocalResourceObject)this.Page).GetLocalResourceObject("Title").ToString() + (" - [ " + this.GetLocalResourceObject("Title").ToString() + " ]");
        }
        SearchMode.Items[0].Text = this.GetLocalResourceObject("SearchName").ToString();
        SearchMode.Items[1].Text = this.GetLocalResourceObject("SearchDescription").ToString();
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="e"></param>
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
    }
    ScriptManager _sm;
    /// <summary>
    /// 
    /// </summary>
    /// <param name="e"></param>
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        _sm = ScriptManager.GetCurrent(this.Page);
        //idata = (IData)this.Page;
        _iLanguage = (ILanguage)this.Page;
        _iLanguage.CreatedLanguage();
        //
        //this.SearchMode.Items.Add(new ListItem(this.GetLocalResourceObject("SearchMode").ToString(), "0"));
        //
        _asyncListLoadingWaitControl = AsyncListLoadingWaitControl.GetCurrent(this.Page);
        _asyncListLoadingWaitControl.RegisterControl(ProductList);
        _asyncListLoadingWaitControl.RegisterControl(this.Add);
        _asyncListLoadingWaitControl.RegisterControl(this.Search);
        _asyncListLoadingWaitControl.RegisterControl(this.Reset);
        //
        if (this.Request.Browser.Browser.Equals("Firefox", StringComparison.InvariantCultureIgnoreCase))
        {
            this.ProductList.BorderStyle = BorderStyle.NotSet;
            this.ProductList.BorderWidth = Unit.Empty;
        }
        //获取客户端记录排序。
        if (this.Request.Cookies["Order_6e0558e28c9f4132"] != null)
        {
            this.ViewState["ORDER"] = Convert.ToBoolean(this.Request.Cookies["Order_6e0558e28c9f4132"].Value);
        }
        //重新绑定控件数据。
        this.PageDataBind();
    }
    #region IManageMaster
    /// <summary>
    /// 
    /// </summary>
    Master _master = null;
    /// <summary>
    /// 
    /// </summary>
    Master IManageMaster.Master
    {
        set
        {
            _master = value;
        }
        get
        {
            return _master;
        }
    }
    #endregion
    /// <summary>
    /// 搜索事件。
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Search_Click(object sender, EventArgs e)
    {
        //重新绑定控件数据。
        PageDataBind();
        this.up1.Update();
        //更新客户端异步加载等待状态完成。
        this._asyncListLoadingWaitControl.UpdateComplete();
    }
    bool isButton = false;
    /// <summary>
    /// 重置按钮。
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Reset_Click(object sender, EventArgs e)
    {
        isButton = true;
        switch (_iLanguage.Language)
        {
            case "zh-CN":
                this.ADS.SelectCommand = "SELECT * FROM CNList";
                this.ADS.DeleteCommand = "DELETE FROM CNList WHERE (ID = ?)";
                break;
            case "zh-TW":
                this.ADS.SelectCommand = "SELECT * FROM TWList";
                this.ADS.DeleteCommand = "DELETE FROM TWList WHERE (ID = ?)";
                break;
            case "en-US":
                this.ADS.SelectCommand = "SELECT * FROM USList";
                this.ADS.DeleteCommand = "DELETE FROM USList WHERE (ID = ?)";
                break;
            case "ja-JP":
                this.ADS.SelectCommand = "SELECT * FROM JPList";
                this.ADS.DeleteCommand = "DELETE FROM JPList WHERE (ID = ?)";
                break;
            case "ko-KR":
                this.ADS.SelectCommand = "SELECT * FROM KRList";
                this.ADS.DeleteCommand = "DELETE FROM KRList WHERE (ID = ?)";
                break;
        }
        if (this.ViewState["ORDER"] == null || !Convert.ToBoolean(this.ViewState["ORDER"]))
        {
            this.ADS.SelectCommand += " ORDER BY ID";
        }
        else
        {
            this.ADS.SelectCommand += " ORDER BY ID DESC";
        }
        this.SearchMode.SelectedIndex = 0;
        this.Key.Text = "";
        //重新绑定控件数据。
        this.ProductList.DataBind();
        //
        this.up1.Update();
        //更新客户端异步加载等待状态完成。
        this._asyncListLoadingWaitControl.UpdateComplete();
        isButton = false;
    }
    /// <summary>
    /// 页面数据绑定方法。
    /// </summary>
    void PageDataBind()
    {
        if (isButton) return;
        try
        {
            //获取搜索字符。
            string text = this.Key.Text.Trim();
            string sql = string.Empty;
            //创建搜索链接初始化sql语句。
            switch (_iLanguage.Language)
            {
                case "zh-CN":
                    sql = "SELECT * FROM CNList";
                    this.ADS.DeleteCommand = "DELETE FROM CNList WHERE (ID = ?)";
                    break;
                case "zh-TW":
                    sql = "SELECT * FROM TWList";
                    this.ADS.DeleteCommand = "DELETE FROM TWList WHERE (ID = ?)";
                    break;
                case "en-US":
                    sql = "SELECT * FROM USList";
                    this.ADS.DeleteCommand = "DELETE FROM USList WHERE (ID = ?)";
                    break;
                case "ja-JP":
                    sql = "SELECT * FROM JPList";
                    this.ADS.DeleteCommand = "DELETE FROM JPList WHERE (ID = ?)";
                    break;
                case "ko-KR":
                    sql = "SELECT * FROM KRList";
                    this.ADS.DeleteCommand = "DELETE FROM KRList WHERE (ID = ?)";
                    break;
            }
            //是否使用条件查询。
            bool isWHERE = false;
            //验证查询字符是否有效。
            if (text != string.Empty)
            {

                //sql += " WHERE [HyperTransport] = " + this.HyperTransport.Checked.ToString();
                //isWHERE = true;
                //验证查询模式。
                switch (this.SearchMode.SelectedIndex)
                {
                    case 0:
                        //查询型号模式。
                        if (isWHERE)
                            sql += " and [Name] like '%" + text + "%'";
                        else
                        {
                            sql += " WHERE [Name] like '%" + text + "%'";
                            isWHERE = true;
                        }
                        break;
                    case 1:
                        if (isWHERE)
                            sql += " and [Description] like '%" + text + "%'";
                        else
                        {
                            sql += " WHERE [Description] like '%" + text + "%'";
                            isWHERE = true;
                        }
                        break;
                }
            }
            this.ADS.SelectCommand = sql;
            //重新设置查询语句。
            this.UpdateORDER();
            //重新绑定数据。
            this.ProductList.DataBind();
        }
        catch (Exception ex)
        {
            _sm.AsyncPostBackErrorMessage = ex.Message;
        }
    }
    /// <summary>
    /// 历史记录排序。
    /// </summary>
    /// <param name="order"></param>
    void HistoryUpdateOrder(bool order)
    {
        HttpCookie l = this.Response.Cookies["Order_6e0558e28c9f4132"];
        if (l == null)
        {
            l = new HttpCookie("Order_6e0558e28c9f4132");
            l.Value = order.ToString();
            l.Expires = DateTime.MaxValue;
            this.Response.Cookies.Add(l);
        }
        else
        {
            l.Value = order.ToString();
            l.Expires = DateTime.MaxValue;
            this.Response.Cookies.Set(l);
        }
    }
    /// <summary>
    /// 列表按钮指令事件。
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ProductList_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        Control c = null;
        //按照按钮指令类型操作。
        switch (e.CommandName)
        {
            case "EditPhoto":
                //编辑图片
                c = this._iEditControl.LoadEditControl("EditPhotoManagement.ascx");
                ((IEditObject)c).EditObject = e.CommandArgument;
                break;
            case "EditParameters":
                //编辑主参数
                c = this._iEditControl.LoadEditControl("EditManagement.ascx");
                ((IEditObject)c).EditObject = e.CommandArgument;
                break;
            case "EditDescription":
                //编辑描述信息
                c = this._iEditControl.LoadEditControl("EditDescriptionManagement.ascx");
                ((IEditObject)c).EditObject = e.CommandArgument;
                break;
            case "ORDER":
                //排序
                if (this.ViewState["ORDER"] == null || !Convert.ToBoolean(this.ViewState["ORDER"]))
                {
                    this.ViewState["ORDER"] = true;
                    this.HistoryUpdateOrder(true);
                }
                else
                {
                    this.ViewState["ORDER"] = false;
                    this.HistoryUpdateOrder(false);
                }
                this.PageDataBind();
                break;
            case "Delete":
                //删除
                //转换指令内容。
                string[] s = ((string)e.CommandArgument).Split(new char[] { '|' });
                //获取要删除的ID。
                string deleteId = (string)s[0];
                //删除主图片
                s[1] = s[1].Trim();
                if (s[1] != string.Empty)
                {
                    try
                    {
                        s[1] = this.Server.MapPath("~/Upload/" + s[1]);
                        if (System.IO.File.Exists(s[1]))
                        {
                            System.IO.File.Delete(s[1]);
                        }
                    }
                    catch (Exception) { }
                }
                //其他图片。
                _iLanguage.CreatedLanguage();
                /*
                using (OleDbConnection conn = new OleDbConnection(DataConfig.ConnectionString))
                {
                    using (OleDbCommand comm = conn.CreateCommand())
                    {
                        try
                        {
                            conn.Open();
                            //删除数据库图片记录。
                            switch (_iLanguage.Language)
                            {
                                case "zh-CN":
                                    comm.CommandText = "DELETE FROM CNListPhotos WHERE ([CameraID] = " + deleteId + ")";
                                    break;
                                case "zh-TW":
                                    comm.CommandText = "DELETE FROM TWListPhotos WHERE ([CameraID] = " + deleteId + ")";
                                    break;
                                case "en-US":
                                    comm.CommandText = "DELETE FROM USListPhotos WHERE ([CameraID] = " + deleteId + ")";
                                    break;
                                case "ja-JP":
                                    comm.CommandText = "DELETE FROM JPListPhotos WHERE ([CameraID] = " + deleteId + ")";
                                    break;
                                case "ko-KR":
                                    comm.CommandText = "DELETE FROM KRListPhotos WHERE ([CameraID] = " + deleteId + ")";
                                    break;
                            }
                            comm.ExecuteNonQuery();
                        }
                        catch (Exception ex)
                        {
                            conn.Close();
                            //返回数据库操作错误消息。
                            _sm.AsyncPostBackErrorMessage = ex.Message;
                        }
                    }
                }
                 */ 
                //设置要删除表的ID值。
                this.ADS.DeleteParameters[0].DefaultValue = deleteId;
                //删除数据库记录。
                this.ADS.Delete();
                break;
            default:
                //其它操作指令。
                break;
        }
        //更新客户端异步加载等待状态完成。
        this._asyncListLoadingWaitControl.UpdateComplete();
    }
    /// <summary>
    /// 添加。
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Add_Click(object sender, EventArgs e)
    {
        if (_master != null)
        {
            _master.UpdateSelectedButton("Manage_Add", false);
            _master.UpdateAscx("Add.ascx");
            //更新客户端异步加载等待状态完成。
            this._asyncListLoadingWaitControl.UpdateComplete();
        }
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ProductList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.PageDataBind();
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ProductList_PreRender(object sender, EventArgs e)
    {
        //
        if (this.ProductList.HeaderRow != null)
        {
            if (this.ViewState["ORDER"] == null || !Convert.ToBoolean(this.ViewState["ORDER"]))
            {
                ((ImageButton)this.ProductList.HeaderRow.Cells[0].Controls[1]).ImageUrl = "~/App_Themes/Manage_Default/images/Table/down.gif";
            }
            else
            {
                ((ImageButton)this.ProductList.HeaderRow.Cells[0].Controls[1]).ImageUrl = "~/App_Themes/Manage_Default/images/Table/up.gif";
            }
        }
        //
        foreach (GridViewRow item in this.ProductList.Rows)
        {
            ((ImageButton)item.Cells[2].FindControl("Delete")).ImageUrl = "~/App_Themes/Manage_Default/images/tool/delete.gif";
        }
    }
    /// <summary>
    /// 
    /// </summary>
    void UpdateORDER()
    {
        if (this.ViewState["ORDER"] == null || !Convert.ToBoolean(this.ViewState["ORDER"]))
        {
            if (this.ADS.SelectCommand.EndsWith("ORDER BY ID"))
            {

            }
            else if (this.ADS.SelectCommand.EndsWith("ORDER BY ID DESC"))
            {
                this.ADS.SelectCommand = this.ADS.SelectCommand.Replace("ORDER BY ID DESC", " ORDER BY ID");
            }
            else
            {
                this.ADS.SelectCommand += " ORDER BY ID";
            }
        }
        else
        {
            if (this.ADS.SelectCommand.EndsWith("ORDER BY ID DESC"))
            {

            }
            else if (this.ADS.SelectCommand.EndsWith("ORDER BY ID"))
            {
                this.ADS.SelectCommand = this.ADS.SelectCommand.Replace("ORDER BY ID", " ORDER BY ID DESC");
            }
            else
            {
                this.ADS.SelectCommand += " ORDER BY ID DESC";
            }
        }
    }
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ProductList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex == -1)
        {

        }
        else
        {
            DataRowView drv = (DataRowView)e.Row.DataItem;
            string s = string.Empty;
            string v = string.Empty;
            /*
            if (drv["ChassisType"] != null)
            {
                v = drv["ChassisType"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["Architecture"] != null)
            {
                v = drv["Architecture"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["ChipFactory"] != null)
            {
                v = drv["ChipFactory"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["CameraSocketType"] != null)
            {
                v = drv["CameraSocketType"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["SupportCameraType"] != null)
            {
                v = drv["SupportCameraType"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["CameraAmount"] != null)
            {
                v = drv["CameraAmount"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + "Camera";
                    }
                    else
                    {
                        s += "/" + v + "Camera";
                    }
                }
            }
            //
            if (drv["FrontSideBusFrequency"] != null)
            {
                v = drv["FrontSideBusFrequency"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v + "GHz";
                    }
                    else
                    {
                        s += "/" + v + "GHz";
                    }
                }
            }
            //
            if (drv["HTBusVersion"] != null)
            {
                v = drv["HTBusVersion"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["HyperTransport"] != null)
            {
                if (s == string.Empty)
                {
                    if (Convert.ToBoolean(drv["HyperTransport"]))
                    {
                        s += this.GetLocalResourceObject("IsHyperTransport").ToString();
                    }
                    else
                    {
                        s += this.GetLocalResourceObject("NoHyperTransport").ToString();
                    }
                }
                else
                {
                    if (Convert.ToBoolean(drv["HyperTransport"]))
                    {
                        s += "/" + this.GetLocalResourceObject("IsHyperTransport").ToString();
                    }
                    else
                    {
                        s += "/" + this.GetLocalResourceObject("NoHyperTransport").ToString();
                    }
                }
            }
            //
            if (drv["ChipsetSeries"] != null)
            {
                v = drv["ChipsetSeries"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["Northbridge"] != null)
            {
                v = drv["Northbridge"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["SouthBridgeChip"] != null)
            {
                v = drv["SouthBridgeChip"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["SupportMemoryType"] != null)
            {
                v = drv["SupportMemoryType"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["SupportForChannelMode"] != null)
            {
                v = drv["SupportForChannelMode"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["MemoryFrequency"] != null)
            {
                v = drv["MemoryFrequency"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["TheNumberOfMemorySlots"] != null)
            {
                v = drv["TheNumberOfMemorySlots"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["MaximumSupportMemory"] != null)
            {
                v = drv["MaximumSupportMemory"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v + "G";
                    }
                    else
                    {
                        s += "/" + v + "G";
                    }
                }
            }
            //
            if (drv["Camera"] != null)
            {
                v = drv["Camera"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["Sound"] != null)
            {
                v = drv["Sound"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["NIC"] != null)
            {
                v = drv["NIC"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += v;
                    }
                }
            }
            ((Literal)e.Row.Cells[0].FindControl("MainParametersContent")).Text = s.EndsWith("/") ? s.Remove(s.Length - 1, 1) : s;
            //
            s = string.Empty;
            //
            if (drv["CameraInterface"] != null)
            {
                v = drv["CameraInterface"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["IDEInterfaceAmount"] != null)
            {
                v = drv["IDEInterfaceAmount"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " IDE";
                    }
                    else
                    {
                        s += "/" + v + " IDE";
                    }
                }
            }
            //
            if (drv["SATAInterfaceAmount"] != null)
            {
                v = drv["SATAInterfaceAmount"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " SATA";
                    }
                    else
                    {
                        s += "/" + v + " SATA";
                    }
                }
            }
            //
            if (drv["SATAIIInterfaceAmount"] != null)
            {
                v = drv["SATAIIInterfaceAmount"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " SATA II";
                    }
                    else
                    {
                        s += "/" + v + " SATA II";
                    }
                }
            }
            //
            if (drv["DiskArrayTypes"] != null)
            {
                v = drv["DiskArrayTypes"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["DiskArrayMode"] != null)
            {
                v = drv["DiskArrayMode"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["GraphicsInterfaceStandard"] != null)
            {
                v = drv["GraphicsInterfaceStandard"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["PCIESlot16X"] != null)
            {
                v = drv["PCIESlot16X"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " PCI Express X16 Slot";
                    }
                    else
                    {
                        s += "/" + v + " PCI Express X16 Slot";
                    }
                }
            }
            //
            if (drv["PCIESlot1X"] != null)
            {
                v = drv["PCIESlot1X"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " PCI Express X1 Slot";
                    }
                    else
                    {
                        s += "/" + v + " PCI Express X1 Slot";
                    }
                }
            }
            //
            if (drv["PCISlot"] != null)
            {
                v = drv["PCISlot"].ToString().Trim();
                if (v != "0")
                {
                    if (s == string.Empty)
                    {
                        s += v + " PCI Slot";
                    }
                    else
                    {
                        s += "/" + v + " PCI Slot";
                    }
                }
            }
            //
            ((Literal)e.Row.Cells[0].FindControl("PerformanceParametersContent")).Text = s.EndsWith("/") ? s.Remove(s.Length - 1, 1) : s;
            //
            s = string.Empty;
            //
            if (drv["PowerCircuit"] != null)
            {
                v = drv["PCISlot"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += "/" + v;
                    }
                }
            }
            //
            if (drv["PowerInterface"] != null)
            {
                v = drv["PowerInterface"].ToString().Trim();
                if (v != string.Empty)
                {
                    if (s == string.Empty)
                    {
                        s += v;
                    }
                    else
                    {
                        s += v;
                    }
                }
            }
            //
            ((Literal)e.Row.Cells[0].FindControl("OtherParametersContent")).Text = s.EndsWith("/") ? s.Remove(s.Length - 1, 1) : s;
             */
        }
    }
}